Counting Solutions to Quadratic Equation Modulo Prime
This result relates to the fact that "square roots" modulo
Proof
Consider
where
Let
Where (1) follows since
Hence
where we once again apply the zero product property for this last step (or more primitively that
Given that
Then, from the above, this implies that
We can also find a nice expression for the number of solutions to such an equation, with less restrictions on
Assuming we have this result now though, then we have the following corollary.
Non-Prime Modulus
Above it was shown that for a non-prime modulus the condition on square roots is that they sum to or differ by a zero divisor. Here is an explicit example showing that there may be more square roots in this case, and how they pair as described above.
has
In this case we have that:
and hence the solutions are the residue classes of
In the case of
Note that these pairs overlap, and the numbers are reused, which is why we don't get as strong of a condition as above for a composite modulus.